<template>
  <div class="risk">
    <eagle-page-list
      :controller="controller"
      :queryParams="queryParams"
      @bindData="bindData"
      :conditions="conditions"
      ref="eaglePageList"
    >
      <template #list>
        <eagle-cell
          style="margin-top: 10px"
          class="br-8"
          v-for="(item, index) in list"
          :key="index"
        >
          <div class="warn_item">
          <div @click="goToDetail(item)">
            <div class="warn_header">
              <div>{{ index + 1 }}、{{ item.MapName }}</div>
            </div>
            <eagle-row gutter="20" class="dep_sort">
              <eagle-col span="24">
                <!-- <img src="@/assets/Images/AppIcon/icon_camera.png" alt="" /> -->
                <div class="mr-10">
                  <img :src="baseUrl+ item.Attachs" alt="" style="width:330px;height:250px" /> 
                </div>
              </eagle-col>
            </eagle-row>
            <eagle-row gutter="20" class="dep_sort">
               <eagle-col span="24">
                <img
                  src="@/assets/Images/AppIcon/icon_list_org.png"
                  alt=""
                />{{ item.OrgFullName }}
              </eagle-col>
            </eagle-row>
            <eagle-row gutter="20" class="dep_sort">
              <eagle-col span="24">
                <img
                  src="@/assets/Images/AppIcon/icon_list_user.png"
                  alt=""
                />{{ item.EditChnName }}
              </eagle-col>
              <eagle-col span="24">
                <img
                  src="@/assets/Images/AppIcon/icon_list_date.png"
                  alt=""
                />{{ item.EditDate }}
              </eagle-col>
            </eagle-row>
          </div>
        </div>
        </eagle-cell>
      </template>
    </eagle-page-list>
  </div>
</template>

<script>
export default {
  data() {
    return {
      baseUrl: process.env.VUE_APP_BASE_API,
      list: [],
      conditions: {},
      controller: "/RiskMapLevel",
      queryParams: {
          dataType: "List",
      },
    };
  },
  created() {
  },
  methods: {
    bindData(data) {
      this.list = [];
      if (data) {
        this.list = data;
      }
    },

    goToDetail(item) {
      this.$router.push({
        path: "/RiskPoint/RiskMapLevelDetail",
        query: { id: item.ID },
      });
    },
  },
};
</script>

<style lang="less" scoped>
.risk {
  background-color: #e8f1f8;
  .info_search {
    padding: 10px;
    border-radius: 5px !important;
    .van-field__control {
      background-color: #ffffff !important;
    }
  }
}
.all_dep {
  background-color: #ffffff;
}

.warn_item {
  background-color: #ffffff;
  /*margin-bottom: 10px;*/
  // padding: 10px 0 10px 10px;
  border-radius: 5px;
  position: relative;
}
.warn_header {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 10px;
  .warn_tag {
    position: absolute;
    right: 0;
    top: 0;
    border-radius: 26.64rem 0 0 26.64rem;
  }
}
.dep_sort {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  img {
    height: 15px;
    width: 15px;
    margin-right: 5px;
  }
}
</style>
